import Vue from 'vue'
import {getThumbnail, parseTime, formatMoney, getRichText} from '@/utils/index'

//  解析图片
Vue.filter('getThumbnail', function (url, w=64, h=64) {
	return getThumbnail(url, { m: 'fill', w, h })
})

//  解析图片
Vue.filter('parseTime', function (time, format) {
	return parseTime(time, format)
})

//  格式化金额
Vue.filter('formatMoney', function (number) {
	return formatMoney(number)
})

//	标签样式过滤
Vue.filter('getRichText', function (html) {
	return getRichText(html)
})